import request from '@/utils/request'
export default {
  data() {
    return {
      loading: false,
      visible: false,
      list: [],
      followUpMethodOptions: [{
        enCode: '1',
        fullName: '协商沟通'
      }, {
        enCode: '2',
        fullName: '激活续费'
      }, {
        enCode: '3',
        fullName: '工商维权'
      }, {
        enCode: '4',
        fullName: '侵权诉讼'
      }],
      handlesOptions: [{
        enCode: '1',
        fullName: '跟进中'
      }, {
        enCode: '2',
        fullName: '已完成'
      }],
      formVisible: false,
      id: ''
    }
  },
  computed: {},
  watch: {},
  created() {

  },
  mounted() {},
  methods: {
    handleCommandDown (command) {
      window.open(command)
    },
    goBack() {
      // this.formVisible = false
      this.$emit('refresh')
    },
    refresh() {

    },
    getData() {
      this.list = []
      request({
        url: 'api/campus/violationscases/' + this.id+ '/followup',
        method: 'get'
      })
        .then(res => {
          this.list = res.data
          this.loading = false
        })
        .catch(() => {
          this.loading = false
        })
    },
    init(id) {
      this.id = id
      this.visible = true
      this.loading = true
      this.getData()
    },
    reset() {
      this.getData()
    }
  }
}
